include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src/qxmpp)
SET( QXMPP_SRCS
    QXmppArchiveIq.cpp
    QXmppArchiveManager.cpp
QXmppBind.cpp
QXmppByteStreamIq.cpp
QXmppClient.cpp
QXmppConfiguration.cpp
QXmppConstants.cpp
QXmppDataForm.cpp
QXmppDiscoveryIq.cpp
QXmppElement.cpp
QXmppIbbIq.cpp
QXmppInformationRequestResult.cpp
QXmppInvokable.cpp
QXmppIq.cpp
QXmppLogger.cpp
QXmppMessage.cpp
QXmppNonSASLAuth.cpp
QXmppPacket.cpp
QXmppPingIq.cpp
QXmppPresence.cpp
QXmppReconnectionManager.cpp
QXmppRemoteMethod.cpp
QXmppRoster.cpp
QXmppRosterIq.cpp
QXmppRpcIq.cpp
QXmppSession.cpp
QXmppSocks.cpp
QXmppStanza.cpp
QXmppStream.cpp
QXmppStreamInitiationIq.cpp
QXmppTransferManager.cpp
QXmppUtils.cpp
QXmppVCard.cpp
QXmppVCardManager.cpp
QXmppVersionIq.cpp
xmlrpc.cpp
)

SET( QXMPP_MOC_HDRS
QXmppArchiveManager.h
QXmppClient.h
QXmppInvokable.h
QXmppLogger.h
QXmppReconnectionManager.h
QXmppRemoteMethod.h
QXmppRoster.h
QXmppSocks.h
QXmppStream.h
QXmppTransferManager.h
QXmppVCardManager.h
)

  ADD_DEFINITIONS( -Wall -DQXMPP_NO_GUI)
  
  SET( QT_USE_QTXML TRUE )
  SET( QT_USE_QTNETWORK TRUE )
  SET( QT_DONT_USE_QTGUI TRUE)

  FIND_PACKAGE( Qt4 REQUIRED )
  
  INCLUDE( ${QT_USE_FILE} )
  
  
  
  QT4_WRAP_CPP( QXMPP_MOC_SRCS ${QXMPP_MOC_HDRS} )

  

  ADD_LIBRARY( QXmppClient ${QXMPP_SRCS} ${QXMPP_MOC_SRCS} )
  TARGET_LINK_LIBRARIES( QXmppClient ${QT_LIBRARIES} )
